package com.suncaper.han_yi_system.pojo.vo;

import lombok.Data;

import java.util.List;
import java.util.Objects;

@Data
public class StyleStatsVo {

    private Long id;

    private Integer academicYear;

    private String name;

    private Byte genderLimit;

    private Integer count;

    private List<SizeVo> sizeVos;

    public Integer getCount(){
        this.count = 0;
        if(!Objects.isNull(this.sizeVos) && !this.sizeVos.isEmpty()){
            for(SizeVo sizeVo : this.sizeVos){
                this.count += sizeVo.getCount();
            }
        }
        return this.count;
    }

}
